package com.jb.repair.util;

import android.app.Dialog;
import android.content.Context;
import android.graphics.Point;
import android.os.Bundle;
import android.util.Log;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;

import com.jb.repair.R;

/**
 * Created by dell on 2016/4/18.
 */
public class CheckFileDialogUtil extends Dialog {

    private TextView tv_wjmc;
    private TextView tv_uname;
    private TextView tv_time;
    private TextView tv_department;
    private int width;
    private int height;

    public CheckFileDialogUtil(Context context) {
        super(context);
    }

    public CheckFileDialogUtil(Context context, int theme) {
        super(context, theme);
        WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
        width = wm.getDefaultDisplay().getWidth();
        height = wm.getDefaultDisplay().getHeight();


    }


    protected CheckFileDialogUtil(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.check_file_dialog);
        tv_wjmc = (TextView) findViewById(R.id.tv_check_wjmc);
        tv_uname = (TextView) findViewById(R.id.tv_check_uname);
        tv_time = (TextView) findViewById(R.id.tv_check_time);
        tv_department = (TextView) findViewById(R.id.tv_check_department);

        getWindow().setLayout(8 * width / 10,
                WindowManager.LayoutParams.WRAP_CONTENT);

    }

    public void setTvWjmc(String wjmc) {
        tv_wjmc.setText(wjmc);
    }

    public void setTvUname(String uname) {
        tv_uname.setText(uname);
    }

    public void setTvTime(String time) {
        tv_time.setText(time);
    }

    public void setTvDepartment(String department) {
        tv_department.setText(department);
    }


}
